<%@page import="entity.Subject"%>
<%@ page language="java" isELIgnored="false" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'testEL.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    This is my JSP page. <br>
    <%
     Subject s=new Subject();
     s.setId(1000);
     s.setSubjectname("核弹头拆卸");
     s.setClassHour(100);
     request.setAttribute("s", s);
     
       String[]ar=new String[]{"老刘说过","不反对拷贝作业","你要消化吸收","否则，很快你就不会拷贝了"};
    	request.setAttribute("arr", ar);
    	pageContext.setAttribute("msg", "data in page");
    	request.setAttribute("msg", "data in request");
    	session.setAttribute("msg", "data in session");
    	application.setAttribute("msg", "data in application");
     %>
     <h1>
      ${msg}，msg属性:<%-- ${msg.stuname} --%>
      <!-- request.getAttribute("msg") -->
     </h1>
      <h1>
     msg in session: ${sessionScope.msg} 
     </h1>
     <h1>
     array:${arr},${arr[0]}
     </h1>
     <h1>课程:${s.id},${s.subjectname},${s.getClassHour()}</h1>
    <h2>
      ${fff}
    </h2>
    <h2>
    请求参数:${param.name},${paramValues.age[0]}
    </h2>
    <h2>Cookie:${cookie['uname'].value}</h2>
    <h2>${pageContext}</h2>
  </body>
</html>
